Skip to content

fix: resolve CI/CD failures in Rust and C# workflows#136

Merged
konard merged 5 commits intomainfrom
issue-135-b2802964181f
Mar 22, 2026
Merged

fix: resolve CI/CD failures in Rust and C# workflows#136
konard merged 5 commits intomainfrom
issue-135-b2802964181f

Conversation

@konard
Copy link
Member

@konard konard commented Mar 22, 2026

Root Causes

1. Rust — Unused import in get-bump-type.rs

In scripts/get-bump-type.rs (line 30), the import use std::process::exit; was present but never used. The CI workflow sets RUSTFLAGS: -Dwarnings, which promotes all compiler warnings — including unused-imports — to hard errors. This caused rust-script to fail, breaking the Auto Release job on every push to main.

2. C# — nuget.exe requires Mono (not available on Ubuntu 24.04)

The pushNuGetPackageToGitHubPackageRegistry job used nuget/setup-nuget@v1 to install nuget.exe, which requires Mono to run on Linux. Ubuntu 24.04 runners don't have Mono pre-installed, causing:

/opt/hostedtoolcache/nuget.exe/7.3.0/x64/nuget: 2: mono: not found
##[error]Process completed with exit code 127.

This has been broken since at least July 2025 (run 16390287640).

Fixes

Rust

  • Remove the unused use std::process::exit; import from scripts/get-bump-type.rs
  • Add changelog fragment for the fix

C# (csharp.yml)

  • Replace nuget CLI with dotnet nuget commands — eliminates Mono dependency entirely
  • Remove nuget/setup-nuget@v1 — no longer needed
  • Update actions/checkout from v1/v3 → v4 (all jobs)
  • Update tj-actions/changed-files from v21 → v46
  • Replace deprecated ::set-output with >> "$GITHUB_OUTPUT"

Evidence

Rust CI (run 23398717024):

error: unused import: `std::process::exit`
  --> scripts/get-bump-type.rs:30:5
   = note: `-D unused-imports` implied by `-D warnings`

C# CI (run 23398717023):

/opt/hostedtoolcache/nuget.exe/7.3.0/x64/nuget: 2: mono: not found
##[error]Process completed with exit code 127.

Case Study

Full analysis with timeline, root cause breakdown, and additional notes is in docs/case-studies/issue-135/.

Closes #135

🤖 Generated with Claude Code

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #135
@konard konard self-assigned this Mar 22, 2026
The `use std::process::exit;` import on line 30 of scripts/get-bump-type.rs
was never used. With `RUSTFLAGS: -Dwarnings` set in CI, unused imports are
promoted to compile errors, causing the Auto Release job to fail when
rust-script attempted to compile and run the script.

Root cause: dead import left behind after a prior refactor of the script.
Fix: remove the single unused `use` statement.

Also adds case study documentation in docs/case-studies/issue-135/ with
full timeline, root cause analysis, CI log evidence, and notes on the
Node.js 20 deprecation warnings present in the same run.

Closes #135

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Find root cause of failures in CI/CD and fix them https://github.com/linksplatform/Numbers/actions/runs/23398717024 fix: remove unused std::process::exit import from get-bump-type.rs Mar 22, 2026
@konard konard marked this pull request as ready for review March 22, 2026 08:11
@konard
Copy link
Member Author

konard commented Mar 22, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $0.638887
  • Calculated by Anthropic: $0.438853 USD
  • Difference: $-0.200034 (-31.31%)

🤖 Models used:

  • Tool: Claude
  • Requested: sonnet
  • Model: Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (459KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Mar 22, 2026

🔄 Auto-restart triggered (iteration 1)

Reason: CI failures detected

Starting new session to address the issues.


Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable.

Adds required changelog.d fragment for the fix that removed the unused
`std::process::exit` import from scripts/get-bump-type.rs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@konard
Copy link
Member Author

konard commented Mar 22, 2026

🔄 Auto-restart-until-mergeable Log (iteration 1)

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $0.543695
  • Calculated by Anthropic: $0.308157 USD
  • Difference: $-0.235537 (-43.32%)

🤖 Models used:

  • Tool: Claude
  • Requested: sonnet
  • Model: Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (844KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Mar 22, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Member Author

konard commented Mar 22, 2026

What about C# CI/CD?

We need to ensure all changes are correct, consistent, validated, tested, logged and fully meet all discussed requirements (check issue description and all comments in issue and in pull request). Ensure all CI/CD checks pass.

@konard konard marked this pull request as draft March 22, 2026 09:06
@konard
Copy link
Member Author

konard commented Mar 22, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-03-22T09:06:34.491Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

The pushNuGetPackageToGitHubPackageRegistry job failed because nuget.exe
requires Mono, which is not installed on Ubuntu 24.04 runners. This has
been broken since at least July 2025 (run 16390287640).

Changes:
- Replace nuget CLI with dotnet nuget commands (no Mono needed)
- Remove nuget/setup-nuget@v1 dependency
- Update actions/checkout from v1/v3 to v4
- Update tj-actions/changed-files from v21 to v46
- Replace deprecated ::set-output with $GITHUB_OUTPUT
- Update case study with C# CI failure analysis

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title fix: remove unused std::process::exit import from get-bump-type.rs fix: resolve CI/CD failures in Rust and C# workflows Mar 22, 2026
@konard konard marked this pull request as ready for review March 22, 2026 09:14
@konard
Copy link
Member Author

konard commented Mar 22, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.281831
  • Calculated by Anthropic: $1.887226 USD
  • Difference: $-1.394605 (-42.49%)

🤖 Models used:

  • Tool: Claude
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (922KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Mar 22, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 6c07900 into main Mar 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find root cause of failures in CI/CD and fix them https://github.com/linksplatform/Numbers/actions/runs/23398717024

1 participant